/* ========================================================================

   (C) Copyright 2023 by Molly Rocket, Inc., All Rights Reserved.
   
   This software is provided 'as-is', without any express or implied
   warranty. In no event will the authors be held liable for any damages
   arising from the use of this software.
   
   Please see https://computerenhance.com for more information
   
   ======================================================================== */

/* ========================================================================
   LISTING 184
   ======================================================================== */

static f64 SineRadiansC_Taylor[16] =
{
    1.0,
    -0.1666666666666666666666666666666666666666666666666666666666666666666666666666667, // 1 / 3!
    0.008333333333333333333333333333333333333333333333333333333333333333333333333333333, // 1 / 5!
    -0.0001984126984126984126984126984126984126984126984126984126984126984126984126984127, // 1 / 7!
    
    2.755731922398589065255731922398589065255731922398589065255731922398589065255732e-6, // 1 / 9!
    -2.505210838544171877505210838544171877505210838544171877505210838544171877505211e-8, // 1 / 11!
    1.605904383682161459939237717015494793272571050348828126605904383682161459939238e-10, // 1 / 13!
    -7.647163731819816475901131985788070444155100239756324412409068493724578380663037e-13, // 1 / 15!
    
    2.811457254345520763198945583010320016233492735204531033973922240339918522302587e-15, // 1 / 17!
    -8.220635246624329716955981236872280749220738991826114134426673217368182813750255e-18, // 1 / 19!
    1.957294106339126123084757437350543035528747379006217651053969813659091146131013e-20, // 1 / 21!
    -3.868170170630684037716911931522812323179342646257347136470296074425081316464453e-23, // 1 / 23!
    
    6.446950284384473396194853219204687205298904410428911894117160124041802194107421e-26, // 1 / 25!
    -9.183689863795546148425716836473913397861687194343179336349230945928493153999175e-29, // 1 / 27!
    1.130996288644771693155876457693831699244050147086598440437097407134050881034381e-31, // 1 / 29!
    -1.216125041553517949629974685692292149724785104394191871437739147455968689284281e-34, // 1 / 31!
};

static f64 SineRadiansC_MFTWP[][11] =
{
    // NOTE(casey): This minimax coefficient table was donated by Demetri Spanos
    
    {},
    {},
    {0x1.fc4eac57b4a27p-1, -0x1.2b704cf682899p-3},
    {0x1.fff1d21fa9dedp-1, -0x1.53e2e5c7dd831p-3, 0x1.f2438d36d9dbbp-8},
    {0x1.ffffe07d31fe8p-1, -0x1.554f800fc5ea1p-3, 0x1.105d44e6222ap-7, -0x1.83b9725dff6e8p-13},
    {0x1.ffffffd25a681p-1, -0x1.555547ef5150bp-3, 0x1.110e7b396c557p-7, -0x1.9f6445023f795p-13, 0x1.5d38b56aee7f1p-19},
    {0x1.ffffffffd17d1p-1, -0x1.55555541759fap-3, 0x1.11110b74adb14p-7, -0x1.a017a8fe15033p-13, 0x1.716ba4fe56f6ep-19, -0x1.9a0e192a4e2cbp-26},
    {0x1.ffffffffffdcep-1, -0x1.5555555540b9bp-3, 0x1.111111090f0bcp-7, -0x1.a019fce979937p-13, 0x1.71dce5ace58d2p-19, -0x1.ae00fd733fe8dp-26, 0x1.52ace959bd023p-33},
    {0x1.fffffffffffffp-1, -0x1.5555555555469p-3, 0x1.111111110941dp-7, -0x1.a01a0199e0eb3p-13, 0x1.71de37e62aacap-19, -0x1.ae634d22bb47cp-26, 0x1.60e59ae00e00cp-33, -0x1.9ef5d594b342p-41},
    {0x1p0, -0x1.5555555555555p-3, 0x1.11111111110c9p-7, -0x1.a01a01a014eb6p-13, 0x1.71de3a52aab96p-19, -0x1.ae6454d960ac4p-26, 0x1.6123ce513b09fp-33, -0x1.ae43dc9bf8ba7p-41, 0x1.883c1c5deffbep-49},
    {0x1p0, -0x1.5555555555555p-3, 0x1.11111111110dcp-7, -0x1.a01a01a016ef6p-13, 0x1.71de3a53fa85cp-19, -0x1.ae6455b871494p-26, 0x1.612421756f93fp-33, -0x1.ae671378c3d43p-41, 0x1.90277dafc8ab9p-49, -0x1.78262e1f2709cp-58},
    {0x1p0, -0x1.5555555555555p-3, 0x1.11111111110dp-7, -0x1.a01a01a01559ap-13, 0x1.71de3a52ad36dp-19, -0x1.ae64549aa7ca9p-26, 0x1.612392f66fdcdp-33, -0x1.ae11556cad6c4p-41, 0x1.71744c339ad03p-49, 0x1.52947c90f8199p-55, -0x1.ff1898c107cfap-59},
};
